FSMBuilder

class FSMBuilder<T : State>(    var statesManager: StatesManager<T> = DefaultStatesManager(InMemoryDefaultStatesManagerRepo()),     val fsmBuilder: (statesManager: StatesManager<T>, states: List<CheckableHandlerHolder<T, T>>) -> StatesMachine<T> = { statesManager, states -> StatesMachine( statesManager, states ) },     var defaultStateHandler: StatesHandler<T, T>? = StatesHandler { null })

Constructors

Link copied to clipboard
fun <T : State> FSMBuilder(    statesManager: StatesManager<T> = DefaultStatesManager(InMemoryDefaultStatesManagerRepo()),     fsmBuilder: (statesManager: StatesManager<T>, states: List<CheckableHandlerHolder<T, T>>) -> StatesMachine<T> = { statesManager, states -> StatesMachine( statesManager, states ) },     defaultStateHandler: StatesHandler<T, T>? = StatesHandler { null })

Functions

Link copied to clipboard
fun add(handler: CheckableHandlerHolder<T, T>)
fun <I : T> add(filter: suspend (state: State) -> Boolean, handler: StatesHandler<I, T>)
fun <I : T> add(kClass: KClass<I>, handler: StatesHandler<I, T>)
Link copied to clipboard
fun <I : T> addStrict(kClass: KClass<I>, handler: StatesHandler<I, T>)
Link copied to clipboard
fun build(): StatesMachine<T>
Link copied to clipboard
inline fun <I : T> doWhen(noinline filter: suspend (state: State) -> Boolean, handler: StatesHandler<I, T>)
Link copied to clipboard
inline fun <I : T> onStateOrSubstate(handler: StatesHandler<I, T>)
Link copied to clipboard
inline fun <I : T> strictlyOn(handler: StatesHandler<I, T>)

Properties

Link copied to clipboard
var defaultStateHandler: StatesHandler<T, T>?
Link copied to clipboard
val fsmBuilder: (statesManager: StatesManager<T>, states: List<CheckableHandlerHolder<T, T>>) -> StatesMachine<T>
Link copied to clipboard
var statesManager: StatesManager<T>